// import 'package:flutter_duominuo/data/remote/home_info.dart';
// import 'package:flutter_duominuo/domain/util/http_manager.dart';
// import 'package:flutter_duominuo/domain/util/http_url.dart';
// import 'package:flutter_duominuo/domain/util/resource.dart';

import '../../data/remote/home_info.dart';
import '../util/http_manager.dart';
import '../util/http_url.dart';
import '../util/resource.dart';

class HomeRepository {
  // 获取首页信息
  Future<HomeStatusInfo?> getHomeStatusInfo() async {
    Resource resource =
        await HttpManager.getInstance().get(HttpUrl.statDataInit, data: {});
    // ignore: avoid_print
    print('getHomeStatusInfo-resource===>${resource}');
    return resource.map((data) => HomeStatusInfo.fromJson(data));
  }

  // // 获取分类商品信息
  // Future<CategoryData?> getCategoryGoodList(int page, String id) async {
  //   print('11page===>$page');
  //   print('11id===>$id');

  //   Resource resource = await HttpManager.getInstance()
  //       .get(HttpUrl.categoryGoodList, data: {id: id}..["page"] = page);
  //   // ignore: avoid_print
  //   print('getCategoryGoodList-resource===>${resource.data}');
  //   return resource.map((data) => CategoryData.fromJson(data));
  // }
}
